/**
 * 
 */
package com.huarui.user.security;

import com.huarui.user.model.SessionMessage;

/**
 * @author peng.sunp
 *
 */
public class UserHolder {

	private static final ThreadLocal<SessionMessage> currentUserLocal = new ThreadLocal<SessionMessage>();

	public static void setCurrenSessionMessage(SessionMessage sessionMessage)
	{
		currentUserLocal.set(sessionMessage);
	}

	public static SessionMessage getCurrentSessionMessage() {
		return currentUserLocal.get();
	}
	
	public static void clear()
	{
		currentUserLocal.remove();
	}
}
